# Dockerfile used by OSBS and by prow CI.
FROM openshift/golang-builder@sha256:4820580c3368f320581eb9e32cf97aeec179a86c5749753a14ed76410a293d83 AS builder
ENV __doozer=update BUILD_RELEASE=202202160023.p0.g53d6d76.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202202160023.p0.g53d6d76.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=53d6d76 OS_GIT_VERSION=4.10.0-202202160023.p0.g53d6d76.assembly.stream-53d6d76 SOURCE_DATE_EPOCH=1643369883 SOURCE_GIT_COMMIT=53d6d76f3f90adb5a46be6f2347a968e5885c586 SOURCE_GIT_TAG=v0.20.0-3109-g53d6d76f3 SOURCE_GIT_URL=https://github.com/openshift/prometheus-operator 
WORKDIR /go/src/github.com/coreos/prometheus-operator
COPY . .
ENV GO111MODULE=on
ENV GOFLAGS="-mod=vendor"
RUN OS=$(go env GOOS) ARCH=$(go env GOARCH) make prometheus-config-reloader-no-deps

FROM openshift/ose-base:v4.10.0.20220216.010142
ENV __doozer=update BUILD_RELEASE=202202160023.p0.g53d6d76.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202202160023.p0.g53d6d76.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=53d6d76 OS_GIT_VERSION=4.10.0-202202160023.p0.g53d6d76.assembly.stream-53d6d76 SOURCE_DATE_EPOCH=1643369883 SOURCE_GIT_COMMIT=53d6d76f3f90adb5a46be6f2347a968e5885c586 SOURCE_GIT_TAG=v0.20.0-3109-g53d6d76f3 SOURCE_GIT_URL=https://github.com/openshift/prometheus-operator 

COPY --from=builder /go/src/github.com/coreos/prometheus-operator/prometheus-config-reloader /usr/bin/
# doesn't require a root user.
USER 1001
ENTRYPOINT ["/usr/bin/prometheus-config-reloader"]

LABEL \
        io.k8s.display-name="Prometheus config reloader" \
        io.k8s.description="This component reloads a Prometheus server in a controlled and configurable way." \
        io.openshift.tags="prometheus" \
        summary="This component reloads a Prometheus server in a controlled and configurable way." \
        maintainer="OpenShift Monitoring Team <team-monitoring@redhat.com>" \
        License="ASL 2.0" \
        vendor="Red Hat" \
        name="openshift/ose-prometheus-config-reloader" \
        com.redhat.component="prometheus-config-reloader-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Monitoring" \
        release="202202160023.p0.g53d6d76.assembly.stream" \
        io.openshift.build.commit.id="53d6d76f3f90adb5a46be6f2347a968e5885c586" \
        io.openshift.build.source-location="https://github.com/openshift/prometheus-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/prometheus-operator/commit/53d6d76f3f90adb5a46be6f2347a968e5885c586" \
        version="v4.10.0"

